home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
hity wydania
/
Ubuntu 9.10 PL
/
karmelkowy-koliberek-desktop-9.10-i386-PL.iso
/
casper
/
filesystem.squashfs
/
lib
/
udev
/
check_driver
< prev
next >
Wrap
Text File
|
2009-10-14
|
499b
|
25 lines
#!/bin/sh
#
#logger check_driver called with: $1 - $2 - $3 -
wanted=$1
devpath=$2
bustype=$3
device=$(readlink /sys/$devpath/device)
device=${device##*/}
driver=$(readlink /sys/$devpath/device/driver)
driver=${driver##*/}
logger device $device is bound to the $driver driver
if [ "$driver" != "$wanted" ]; then
logger must rebind
echo -n "$device" > /sys/$devpath/device/driver/unbind
echo -n "$device" > /sys/bus/$bustype/drivers/$wanted/bind
else
logger no need to rebind
fi